# -*- coding: utf-8 -*- 
import socket
import string
import threading,  Queue
import time
import select
import sys
from generic import *
from window_chat import *
from PyQt4 import QtCore, QtGui
from ventana import Ui_Form


class chat():
    def __init__(self):
        q = Queue.Queue()
        queueSend = Queue.Queue()
        queueTextRecv = Queue.Queue()
        
        window_chat = WindowChat(q,  queueSend,  queueTextRecv)
        window_chat.start()
        
        SendRecv(q,  queueSend)
        window_chat.join()
        
        print "Se ha cerrado el cliente de chat"
